package com.bluegalaxy.nhb.snservice.dictionary;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 *
 * @author:
 * @date: 2018/2/27
 * @time: 13:50
 * @description: Http ContentType字典对应记录 (后缀名称)
 * To change this template use File | Settings | File Templates.
 */
public class HttpContentTypeDictonary {

    /**
     * 数据存储
     */
    private static final Map<String,String> map = new HashMap<>();

    /**
     * 获取数据文件后缀名
     * @param contentType
     * @return
     */
    public static String getFileSuffix(String contentType){
        return map.get(contentType);
    }

    static {
        map.put("application/vnd.android.package-archive","apk");
        map.put("video/3gpp","3gp");
        map.put("application/postscript","ai");
        map.put("audio/x-aiff","aif");
        map.put("audio/x-aiff","aifc");
        map.put("audio/x-aiff","aiff");
        map.put("text/plain","asc");
        map.put("application/atom+xml","atom");
        map.put("audio/basic","au");
        map.put("video/x-msvideo","avi");
        map.put("application/x-bcpio","bcpio");
        map.put("application/octet-stream","bin");
        map.put("image/bmp","bmp");
        map.put("application/x-netcdf","cdf");
        map.put("image/cgm","cgm");
        map.put("application/octet-stream","class");
        map.put("application/x-cpio","cpio");
        map.put("application/mac-compactpro","cpt");
        map.put("application/x-csh","csh");
        map.put("text/css","css");
        map.put("application/x-director","dcr");
        map.put("video/x-dv","dif");
        map.put("application/x-director","dir");
        map.put("image/vnd.djvu","djv");
        map.put("image/vnd.djvu","djvu");
        map.put("application/octet-stream","dll");
        map.put("application/octet-stream","dmg");
        map.put("application/octet-stream","dms");
        map.put("application/msword","doc");
        map.put("application/xml-dtd","dtd");
        map.put("video/x-dv","dv");
        map.put("application/x-dvi","dvi");
        map.put("application/x-director","dxr");
        map.put("application/postscript","eps");
        map.put("text/x-setext","etx");
        map.put("application/octet-stream","exe");
        map.put("application/andrew-inset","ez");
        map.put("video/x-flv","flv");
        map.put("image/gif","gif");
        map.put("application/srgs","gram");
        map.put("application/srgs+xml","grxml");
        map.put("application/x-gtar","gtar");
        map.put("application/x-gzip","gz");
        map.put("application/x-hdf","hdf");
        map.put("application/mac-binhex40","hqx");
        map.put("text/html","htm");
        map.put("text/html","html");
        map.put("x-conference/x-cooltalk","ice");
        map.put("image/x-icon","ico");
        map.put("text/calendar","ics");
        map.put("image/ief","ief");
        map.put("text/calendar","ifb");
        map.put("model/iges","iges");
        map.put("model/iges","igs");
        map.put("application/x-java-jnlp-file","jnlp");
        map.put("image/jp2","jp2");
        map.put("image/jpeg","jpe");
        map.put("image/jpeg","jpeg");
        map.put("image/jpeg","jpg");
        map.put("application/x-javascript","js");
        map.put("audio/midi","kar");
        map.put("application/x-latex","latex");
        map.put("application/octet-stream","lha");
        map.put("application/octet-stream","lzh");
        map.put("audio/x-mpegurl","m3u");
        map.put("audio/mp4a-latm","m4a");
        map.put("audio/mp4a-latm","m4p");
        map.put("video/vnd.mpegurl","m4u");
        map.put("video/x-m4v","m4v");
        map.put("image/x-macpaint","mac");
        map.put("application/x-troff-man","man");
        map.put("application/mathml+xml","mathml");
        map.put("application/x-troff-me","me");
        map.put("model/mesh","mesh");
        map.put("audio/midi","mid");
        map.put("audio/midi","midi");
        map.put("application/vnd.mif","mif");
        map.put("video/quicktime","mov");
        map.put("video/x-sgi-movie","movie");
        map.put("audio/mpeg","mp2");
        map.put("audio/mpeg","mp3");
        map.put("video/mp4","mp4");
        map.put("video/mpeg","mpe");
        map.put("video/mpeg","mpeg");
        map.put("video/mpeg","mpg");
        map.put("audio/mpeg","mpga");
        map.put("application/x-troff-ms","ms");
        map.put("model/mesh","msh");
        map.put("video/vnd.mpegurl","mxu");
        map.put("application/x-netcdf","nc");
        map.put("application/oda","oda");
        map.put("application/ogg","ogg");
        map.put("video/ogv","ogv");
        map.put("image/x-portable-bitmap","pbm");
        map.put("image/pict","pct");
        map.put("chemical/x-pdb","pdb");
        map.put("application/pdf","pdf");
        map.put("image/x-portable-graymap","pgm");
        map.put("application/x-chess-pgn","pgn");
        map.put("image/pict","pic");
        map.put("image/pict","pict");
        map.put("image/png","png");
        map.put("image/x-portable-anymap","pnm");
        map.put("image/x-macpaint","pnt");
        map.put("image/x-macpaint","pntg");
        map.put("image/x-portable-pixmap","ppm");
        map.put("application/vnd.ms-powerpoint","ppt");
        map.put("application/postscript","ps");
        map.put("video/quicktime","qt");
        map.put("image/x-quicktime","qti");
        map.put("image/x-quicktime","qtif");
        map.put("audio/x-pn-realaudio","ra");
        map.put("audio/x-pn-realaudio","ram");
        map.put("image/x-cmu-raster","ras");
        map.put("application/rdf+xml","rdf");
        map.put("image/x-rgb","rgb");
        map.put("application/vnd.rn-realmedia","rm");
        map.put("application/x-troff","roff");
        map.put("text/rtf","rtf");
        map.put("text/richtext","rtx");
        map.put("text/sgml","sgm");
        map.put("text/sgml","sgml");
        map.put("application/x-sh","sh");
        map.put("application/x-shar","shar");
        map.put("model/mesh","silo");
        map.put("application/x-stuffit","sit");
        map.put("application/x-koan","skd");
        map.put("application/x-koan","skm");
        map.put("application/x-koan","skp");
        map.put("application/x-koan","skt");
        map.put("application/smil","smi");
        map.put("application/smil","smil");
        map.put("audio/basic","snd");
        map.put("application/octet-stream","so");
        map.put("application/x-futuresplash","spl");
        map.put("application/x-wais-source","src");
        map.put("application/x-sv4cpio","sv4cpio");
        map.put("application/x-sv4crc","sv4crc");
        map.put("image/svg+xml","svg");
        map.put("application/x-shockwave-flash","swf");
        map.put("application/x-troff","t");
        map.put("application/x-tar","tar");
        map.put("application/x-tcl","tcl");
        map.put("application/x-tex","tex");
        map.put("application/x-texinfo","texi");
        map.put("application/x-texinfo","texinfo");
        map.put("image/tiff","tif");
        map.put("image/tiff","tiff");
        map.put("application/x-troff","tr");
        map.put("text/tab-separated-values","tsv");
        map.put("text/plain","txt");
        map.put("application/x-ustar","ustar");
        map.put("application/x-cdlink","vcd");
        map.put("model/vrml","vrml");
        map.put("application/voicexml+xml","vxml");
        map.put("audio/x-wav","wav");
        map.put("image/vnd.wap.wbmp","wbmp");
        map.put("application/vnd.wap.wbxml","wbxml");
        map.put("video/webm","webm");
        map.put("text/vnd.wap.wml","wml");
        map.put("application/vnd.wap.wmlc","wmlc");
        map.put("text/vnd.wap.wmlscript","wmls");
        map.put("application/vnd.wap.wmlscriptc","wmlsc");
        map.put("video/x-ms-wmv","wmv");
        map.put("model/vrml","wrl");
        map.put("image/x-xbitmap","xbm");
        map.put("application/xhtml+xml","xht");
        map.put("application/xhtml+xml","xhtml");
        map.put("application/vnd.ms-excel","xls");
        map.put("application/xml","xml");
        map.put("image/x-xpixmap","xpm");
        map.put("application/xml","xsl");
        map.put("application/xslt+xml","xslt");
        map.put("application/vnd.mozilla.xul+xml","xul");
        map.put("image/x-xwindowdump","xwd");
        map.put("chemical/x-xyz","xyz");
        map.put("application/zip","zip");
        map.put("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","xlsx");
        map.put("application/vnd.openxmlformats-officedocument.wordprocessingml.document","docx");
        map.put("application/vnd.openxmlformats-officedocument.wordprocessingml.template","dotx");
        map.put("application/vnd.openxmlformats-officedocument.presentationml.presentation","pptx");
        map.put("application/vnd.openxmlformats-officedocument.presentationml.slideshow","ppsx");
        map.put("application/vnd.openxmlformats-officedocument.presentationml.template","potx");
        map.put("application/vnd.openxmlformats-officedocument.spreadsheetml.template","xltx");
    }
}
